package com.gears_software.sxdc.dccx.data.finder;

import com.gears_software.sxdc.dccx.data.model.ResultModel;
import com.gears_software.sxdc.dccx.data.model.TypeModel;
import com.gears_software.sxdc.dccx.data.model.AboutModel;
import com.gears_software.sxdc.dccx.data.model.VersionUpdateModel;

import org.androidannotations.rest.spring.annotations.Get;
import org.androidannotations.rest.spring.annotations.Path;
import org.androidannotations.rest.spring.annotations.Rest;
import org.androidannotations.rest.spring.api.RestClientErrorHandling;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;

import java.util.List;

/**
 * Created by chezhenzhen on 2017/8/1.
 * 公共接口
 */

@Rest(rootUrl = RequestUrl.ROOT, converters = {MappingJackson2HttpMessageConverter.class})
public interface IBaseFinder extends RestClientErrorHandling {
    //车辆颜色
    @Get("/api/type/vehicle_color")
    ResultModel<List<TypeModel>> getVehicleColor();

    //获取token
    @Get("/jwt/qiniu/token")
    ResultModel<String> getToken();

    //车辆类型
    @Get("/api/type/car_type")
    ResultModel<List<TypeModel>> getCarType();

    //关于我们
    @Get("/api/type/about")
    ResultModel<AboutModel> getAbout();

    //版本更新
    @Get("/api/type/get_version?type={type}&client={client}")
    ResultModel<VersionUpdateModel> getVersion(@Path String type, @Path String client);
}
